package com.cx.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.thymeleaf.util.StringUtils;

import java.util.Date;

/**
 * @auther: Centaury
 * @Date:2023/3/19 - 03 - 19 - 21:42
 */
@Data
@NoArgsConstructor
public class Employee {

    private Integer id;
    private String lastName;
    private String email;
    private Integer gender;
    private Department department;
    // @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String birth;

    public Employee(Integer id, String lastName, String email, Integer gender, Department department) {
        this.id = id;
        this.lastName = lastName;
        this.email = email;
        this.gender = gender;
        this.department = department;
        // 默认日期的实现
        this.birth = StringUtils.toString(new Date());
    }
}



